<script>
  $(document).ready(function()
  {
    $("#frmBox").validate();
  });
</script>

<div id="centerCont"> 
<strong>Box >> </strong> Edit
<br />
<br />
<form name="frmBox" id="frmBox" action="/admin/box/save" method="post">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table">
<tr>
 <td class="hligh2" width="20%"><label for="boxname">Box Name</label><span class="require">*</span></td>
 <td class="hligh2">   
   <input type="text" name="boxname" id="boxname" 
   value="<?php echo $this->objBox->boxname; ?>" style="width:200px" maxlength="50"
   title="Bạn phải nhập tên Box" class="required">
   </td>
</tr>
<tr>
 <td class="hligh1" valign="top"><label for="content">Content</label><span class="require">*</span></td>
 <td class="hligh1">   
	<textarea name="content"   title="Bạn phải nhập nội dung cho Box" class="required" cols="100" rows="10" style="width: 100%"><?php echo $this->objBox->content; ?></textarea>   
   </td>
</tr>            
</table>
<br />
<p>
<input type="button" name="cancel" value="Cancel" onclick="onClickCancel()" class="button"/>
<input type="submit" name="submit" value="Submit" onclick="onClickSubmit()" class="button"/>
<input type="hidden" name="id" value="<?php echo $this->objBox->boxid; ?>" />
</p>
</form>
<script type="text/javascript">
tinyMCE.init({
        // General options
        mode : "textareas",
        theme : "advanced",
		editor_selector : "mceEditor",
        plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

        // Theme options
        theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,forecolor,backcolor",
        theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        theme_advanced_resizing : true,
});
</script>
<script type="text/javascript">
	function onClickCancel()
	{
		$.cookie('edit', 'true',{ path: '/admin/box' });
		window.location='/admin/box/list';
	}
	function onClickSubmit()
	{		
		$.cookie('edit', 'true',{ path: '/admin/box' });
		$("form#frmView").submit();
	}
	$(document).ready(function(){  
 
	});   
</script>